module.exports = function (api) {
  const presets = [
    [
      '@babel/preset-env',
      {
        modules: false
      }
    ]
  ]
  const plugins = []
  if (api.env('production')) {
    plugins.push('@babel/transform-runtime')
  }
  return {
    presets,
    plugins
  }
}
